﻿<%@ Page Language="C#" MasterPageFile="~/InventoryTracker/MasterPage.master" AutoEventWireup="true" CodeFile="LocationMaster.aspx.cs" Inherits="InventoryTracker_LocationMaster1" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="maincontent" Runat="Server">


<div id="projectreport">
        <a name="content_start0" id="content_start0"></a>
        <fieldset>
            <h2 class="none">
                Location Master</h2>
            <legend>Location Information</legend>
            <div class="formsection">
                Location</div>
            
            <table >
            <tr>
            <td >
                <asp:DropDownList ID="DdlLocationName" runat="server" DataSourceID="SqlDSLoc" 
                    DataTextField="LocationName" DataValueField="LocationID" 
                    AutoPostBack="True" onselectedindexchanged="DdlLocationName_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDSLoc" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT [LocationID], [LocationName] FROM [LocationMaster]">
                </asp:SqlDataSource>
            </td>
                <td>
                     <p style="height: 44px; width: 170px;">
                       <asp:Label ID="lblLocName" runat="server" Text="Location Name"></asp:Label>
        
                        <asp:RequiredFieldValidator ID="ReqFieldValiName" runat="server" ControlToValidate="txtLocName"
                        ErrorMessage="*" Display="Dynamic" Enabled="false"></asp:RequiredFieldValidator>
                        <asp:TextBox ID="txtLocName" runat="server"   ></asp:TextBox><br />
        
                    </p>
                    <p style="height: 44px; width: 170px;">
                        <asp:Label ID="lblLocAddressLine1" runat="server" Text="Address Line1"></asp:Label>
                        <asp:RequiredFieldValidator ID="ReqFieldValiAddr1" runat="server" 
                        ControlToValidate="txtLocAddressLine1" ErrorMessage="*" Enabled="false"
                        ToolTip="Address is required."></asp:RequiredFieldValidator>
                        <br />
                        <asp:TextBox ID="txtLocAddressLine1" runat="server"  TextMode="MultiLine" Width="150px" Height="22px"  
                              ></asp:TextBox>
                    </p>
                    <p style="height: 44px">
                        <asp:Label ID="lblLocAddressLine2" runat="server" Text="Address Line2"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtLocAddressLine2" runat="server" TextMode="MultiLine"  Width="150px" Height="22px" 
                             ></asp:TextBox>
                    </p>
                    <p style="width: 170px; height: 44px;">
                        <asp:Label ID="lblLocCity" runat="server" Text="Location City"></asp:Label>
                        <asp:RequiredFieldValidator ID="ReqFieldValiCity" runat="server" 
                            ControlToValidate="txtLocCity" ErrorMessage="*" Enabled="false"
                        ToolTip="City is required."></asp:RequiredFieldValidator>
                        <asp:TextBox ID="txtLocCity" runat="server"   ></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                            ControlToValidate="txtLocCity" ErrorMessage="Enter only Characters." 
                            ValidationExpression="^[a-zA-Z\s.]*$"></asp:RegularExpressionValidator>
                        <br />
                    </p>
                    
            
                    <p style="height: 44px">
                        <asp:Label ID="lblLocState" runat="server" Text="State"></asp:Label>
                        <asp:RequiredFieldValidator ID="ReqFieldValiState" runat="server" ControlToValidate="txtLocState" ErrorMessage="*" 
                        ToolTip="State is required." Enabled="false"></asp:RequiredFieldValidator>
                        <br />
                        <asp:TextBox ID="txtLocState" runat="server"  ></asp:TextBox><br />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                            ControlToValidate="txtLocState" ErrorMessage="Enter only Characters." 
                            ValidationExpression="^[a-zA-Z\s.]*$"></asp:RegularExpressionValidator>
                    </p>
               </td>

               <td>
                     <p style="height: 44px; width: 170px; top: 74px; left: 305px; position: absolute;">
                        <asp:Label ID="lblLocCountry" runat="server" Text="Country"></asp:Label>
                        <asp:RequiredFieldValidator ID="ReqFieldValiCountry" runat="server" 
                            ControlToValidate="txtLocCountry" ErrorMessage="*" 
                            ToolTip="Country is required." Enabled="false"></asp:RequiredFieldValidator>
                           <asp:TextBox ID="txtLocCountry" runat="server"  ></asp:TextBox>
                           <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                            ControlToValidate="txtLocCountry" ErrorMessage="Enter only Characters." 
                            ValidationExpression="^[a-zA-Z\s.]*$"></asp:RegularExpressionValidator>
                           
                        
             </p>
                    <p style="height: 44px; width: 170px;">
                        <asp:Label ID="lblLocPhone" runat="server" Text="Phone No" Font-Bold="False"></asp:Label>
                          <asp:TextBox ID="txtLocPhone" runat="server" CausesValidation="True" 
                              ></asp:TextBox>
                              <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtLocPhone"
runat="server" ErrorMessage="Invalid Phone No:" ValidationExpression="^[0-9]*$" SetFocusOnError="True"></asp:RegularExpressionValidator>
                        <b/>
                          
                    </p>
                    <p style="height: 44px; width: 167px;">
                        <asp:Label ID="lblLocFax" runat="server" Text="Fax" Font-Bold="False"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtLocFax" runat="server"   ></asp:TextBox>
                        
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" ControlToValidate="txtLocFax"
runat="server" ErrorMessage="Invalid Fax No:" ValidationExpression="^[0-9]*$" SetFocusOnError="True"></asp:RegularExpressionValidator>
                    </p>
                    <p style="height: 44px">
                        <asp:Label ID="lblLocRemarks" runat="server" Text="Remarks" Font-Bold="False"></asp:Label>
                        <br />
                         <asp:TextBox ID="txtLocRemarks" runat="server"  TextMode="MultiLine" Width="150px" Height="22px" 
                              ></asp:TextBox>
                    </p>
                    
            </td>
            </tr>
            </table>
            <asp:Label ID="lblWarn" runat="server" Text="* Required Fields" 
                ForeColor="Red"></asp:Label>
            <div class="formsection">
            
                <asp:Button ID="btnLocSubmit" runat="server" Text="Submit" 
                    onclick="btnLocSubmit_Click"/>
                        
               <asp:Button ID="btnNew" runat="server" Text="New" onclick="btnNew_Click" AutoPostBack="True"></asp:Button>
               <asp:Button ID="btnDelete" runat="server" Text="Delete" 
                    onclick="btnDelete_Click"/>
                             
               <asp:Button ID="btnEdit" runat="server" Text="Edit" 
                    onclick="btnEdit_Click"/>
                    <asp:Button ID="btnLocUpdate" runat="server" Text="Update" 
                    onclick="btnLocUpdate_Click"></asp:Button>
               <asp:Label ID="lblResult" runat="server"></asp:Label>
            </div>
        </fieldset>
    </div>

</asp:Content>

